<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<meta name="copyright" content="http://www.appcms.org" />
<link rel="stylesheet" href="skin/base.css">
<link rel="stylesheet" href="skin/user_sign.css">
<link rel="stylesheet" href="skin/comment.css">
<script src="js/zy_control.js"></script>
<script src="js/zy_click.js"></script>
<script src="js/config.js"></script>
<script src="js/common.js"></script>
</head>
<body>
	<div id="main" class="box-ver box">
	<script>
		setHead('sign',l_common['head_txt_sign']);
		setContent();
		setFooter('user_sign');
	</script>
	</div>
</body>
<script>
	zy_init();
	function integral(){
		if (c_l()) {
			var url = app_path+'index.php?m=iapp&c=user&a=integral&userid='+localStorage['u_id']+'&acctoken='+localStorage['u_acctoken'];
			uexXmlHttpMgr.open(0,'post',url,"8000");
			uexXmlHttpMgr.send(0);
		}else{
			gologin();
		}
	}

	function oklogin(m){
		alert("登录成功~");
	}
	
	function help(){
		uexWindow.open('help', '0', 'help.html', 2, '', '', 0);
	}
	
	function jifen(){
		localStorage.removeItem("jifen_catid");
		uexWindow.open('jifen', '0', 'jifen.html', 2, '', '', 0);
	}
	
	window.uexOnload=function(type){
		if(!type){
			uexXmlHttpMgr.onData = function(opId, status, data){
				uexXmlHttpMgr.close(opId);
				if (status == 1) {
					data=JSON.parse(data);
					if(opId == 0){
						var html="";
						html +='<div class="sign">';
						html +='<h3 id="h3">'+data['msg']+'</h3>';
                        html +='<p>明天再来，可领到'+data['data']['tom']+'个'+l_common['head_txt_integral']+'，别忘记哦~</p>';
                        html +='<div class="my">你的总资产：<span>'+data['data']['integral']+'个'+l_common['head_txt_integral']+'</span></div>';
                        html +='<div class="dh" ontouchstart="zy_touch(\'active\')" onclick="jifen()">礼品兑换区</div>';
                        html +='<p ontouchstart="zy_touch(\'active\')" onclick="help()">如何赚取更多'+l_common['head_txt_integral']+'？</p>';
                        html +='</div>';
						$$('content').innerHTML = html;
						localStorage['u_integral'] = data['data']['integral'];
						uexWindow.evaluatePopoverScript('more','content','integral()');
					}
				}else if (status == -1) {
					integral();
				}
			}
			integral();
		}
	}
</script>
</html>